<?php
declare (strict_types=1);

namespace app\admin\validate;

use think\Validate;

class Common extends Validate
{
    protected $rule = [
        'admin_name' => 'require',
        'password' => 'require',
        'captcha' => 'require|captcha'
    ];

    protected $message = [
        'admin_name.require' => '请输入用户名',
        'password.require' => '请输入密码',
        'captcha.require' => '请输入验证码',
        'captcha.captcha' => '验证码有误',
    ];

    protected $scene = [
        'login' => ['admin_name', 'password', 'captcha']
    ];
}